package com.zingrow.web.report.base;

public class TableField {
    public static final String ID = "id";
    public static final String SOURCE_NAME = "sourceName";
    public static final String FIRST_NUM = "firstNum";
    public static final String SECOND_NUM = "secondNum";
    public static final String THIRD_NUM = "thirdNum";
    public static final String TIME = "time";
    public static final String TITLE = "title";
    public static final String AUTHOR = "author";
    public static final String CONTENT = "content";
    public static final String URL = "url";
    /**
     * 表格这一栏的标题
     */
    private String title;
    /**
     * 标题需要取出的json字段
     */
    private String valueField;
    /**
     * 数据在datalist中的key字段
     */
    private String dataListField;
    /**
     * 这一栏所占的百分比
     */
    private float widthPercent;
    /**
     * 若值有超链接，则填写这个超链接地址在json中的字段名
     */
    private String urlField;
    /**
     * 若值需要格式化时间，则填写此栏
     */
    private String timeFormat;
    /**
     * 文字格式化方案
     */
    private String textFormat;
    /**
     * 是否为ID自增
     */
    private boolean incr;
    /**
     * 是否居中
     */
    private boolean center = true;

    public TableField(String title, String valueField, String dataListField, float widthPercent, String urlField,
            String timeFormat, boolean center, String textFormat, boolean incr) {
        super();
        this.title = title;
        this.valueField = valueField;
        this.widthPercent = widthPercent;
        this.urlField = urlField;
        this.timeFormat = timeFormat;
        this.center = center;
        this.dataListField = dataListField;
        this.textFormat = textFormat;
        this.incr = incr;
    }

    public String getTextFormat() {
        return textFormat;
    }

    public void setTextFormat(String textFormat) {
        this.textFormat = textFormat;
    }

    public boolean isIncr() {
        return incr;
    }

    public void setIncr(boolean incr) {
        this.incr = incr;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getValueField() {
        return valueField;
    }

    public void setValueField(String valueField) {
        this.valueField = valueField;
    }

    public float getWidthPercent() {
        return widthPercent;
    }

    public void setWidthPercent(float widthPercent) {
        this.widthPercent = widthPercent;
    }

    public String getUrlField() {
        return urlField;
    }

    public void setUrlField(String urlField) {
        this.urlField = urlField;
    }

    public String getTimeFormat() {
        return timeFormat;
    }

    public void setTimeFormat(String timeFormat) {
        this.timeFormat = timeFormat;
    }

    public boolean isCenter() {
        return center;
    }

    public void setCenter(boolean center) {
        this.center = center;
    }

    public String getDataListField() {
        return dataListField;
    }

    public void setDataListField(String dataListField) {
        this.dataListField = dataListField;
    }

}
